<extend name="Public/base"/>

<block name="body">
    <div class="portlet box blue">
        <div class="portlet-title">
            <div class="caption"><i class="fa fa-reorder"></i>{$_GET['title']}课时表信息</div>
            <div class="tools">
                <a href="" class="collapse"></a><a href="" class="remove"></a>
            </div>
        </div>
        <div class="portlet-body">

            <style>
                th,td{text-align: center;}
            </style>
            <form class="seme-form" action="{:U('')}" method="post">
                <div class="col-md-10" id="printArea">

                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <volist name="head_list" id="heads">
                                    <th>{$heads.title}</th>
                                </volist>
                            </tr>
                            </thead>
                        </table>

                        <table class="table table-bordered">
                            <tbody>
                            <volist name="_list" id="data">
                                <tr>
                                    <volist name="data" id="vos">
                                        <td>{$vos.title}
                                            <div class="pull-right">
                                                <if condition="$vos.val eq 1">
                                                    <b class="text-danger">忙</b><input  class="scheck" type="checkbox" name="courses[]" disabled value="{$vos.scid}" checked />
                                                    <else/>
                                                    <input  type="checkbox" name="courses[]" disabled value="{$vos.scid}"/>
                                                </if>

                                            </div>
                                        </td>
                                    </volist>
                                </tr>
                            </volist>
                            </tbody>
                        </table>

                    </div>
                </div>

                <div class="col-md-2 text-right">
                    <input class="btn blue btn-block margin-bottom-10" value="打印 " id="btnPrint" onclick="onprint()">
                </div>
            </form>
            <div class="clearfix"></div>
        </div>
    </div>

</block>

<block name="script">

    <script src="__STATIC__/scripts/app.js"></script>
    <script src="__STATIC__/scripts/table-managed.js"></script>
    <script>
        jQuery(document).ready(function() {
            App.init();
            TableManaged.init();
            $('td').css('cursor','pointer');
            highlight_subnav('{:U('Courseware/teacheerhour')}');
        });

        function printHtml(html) {
            var bodyHtml = document.body.innerHTML;
            document.body.innerHTML = html;
            window.print();
            document.body.innerHTML = bodyHtml;
        }
        function onprint() {
            var html = $("#printArea").html();
            printHtml(html);
        }
    </script>
</block>